package org.springblade.modules.admin.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springblade.core.tool.utils.DateUtil;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 维保任务表实体类
 *
 * @author ysq
 * @since 2022-03-09
 */
@Data
@TableName("blade_maintain_plan_content")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "MaintainPlanContent对象", description = "维保任务表")
public class MaintainPlanContent extends TenantEntity {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "流程定义主键")
	private String processDefinitionId;

	@ApiModelProperty(value = "流程实例主键")
	private String processInstanceId;

	/**
	 * 电梯id
	 */
	@ApiModelProperty(value = "电梯id")
	private Long elevatorId;
	/**
	 * 1: 保养, 2: 维修, 3: 困人
	 */
	@ApiModelProperty(value = "1: 保养, 2: 维修, 3: 困人")
	private Integer typeStatus;
	/**
	 * 开始时间
	 */
	@ApiModelProperty(value = "开始时间")
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	private Date planDate;
	/**
	 * 结束时间
	 */
	@ApiModelProperty(value = "结束时间")
	@DateTimeFormat(pattern = DateUtil.PATTERN_DATE)
	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	private Date finishDate;
	/**
	 * 0: 未延迟, 1: 延迟
	 */
	@ApiModelProperty(value = "0: 未延迟, 1: 延迟")
	private Integer isDeferred;

	/**
	 * 任务来源: 1: 物业端, 2: 微信, 3: 服务电话, 4: 系统派单, 5: 维保端
	 */
	@ApiModelProperty(value = "任务来源: 1: 物业端, 2: 微信, 3: 服务电话, 4: 系统派单, 5: 维保端")
	private Integer planFrom;

	@ApiModelProperty(value = "梯联网关联id")
	private String tlwJoinId;

	@TableField(exist = false)
	private Long userId;

	@TableField(exist = false)
	private Date startTime;

	@TableField(exist = false)
	private Date endTime;

	@TableField(exist = false)
	private BigDecimal workTime;

	@TableField(exist = false)
	private Integer overdueDay;

	@TableField(exist = false)
	private String  userIds;

	@TableField(exist = false)
	private Date planOverdueDate;

	@TableField(exist = false)
	private Date elevatorOverdueDate;

	@TableField(exist = false)
	private Date maintainSignatureTime;

	@TableField(exist = false)
	private Integer auditType;

	@TableField(exist = false)
	private Integer workOrderType;

	private Integer sourcePlanType;

	/**
	 *  计划完成时间
	 */
	private Date planFinishDate;


	@TableField(exist = false)
	private String closeDesc;
}
